<% homeModels = VishConfig.getHomeModels({:return_instances => true}) %>

<% resources = subject_content(profile_or_current_subject, homeModels, {:scope => scope, :limit => 0, :page=> page, :sort_by=> params[:sort_by]||sort_by }) %>

<% resources.each do |resource| %>
	<%= render :partial => 'entities/entity', :locals => { :entity => resource, :prefix_id=> prefix_id} %>
<% end %>

<script>
  <%if request.xhr?%>
    force_update_pageless("net", <%=resources.num_pages%>, <%=resources.current_page%>);
  <%else%>
    document.addEventListener("DOMContentLoaded", function(){  
      force_update_pageless("net", <%=resources.num_pages%>, <%=resources.current_page%>);
    });
  <%end%>
	
</script>

